The Grammar Hammer of 2012

نویسنده

  • Vadim Zaytsev
چکیده

Normal Form In order to fit any grammar into the conditions required by the previously described matching techniques, we demand the following normalisation: 1. lack of labels for production rules 2. lack of named subexpressions 3. lack of terminal symbols 4. maximal outward factoring of inner choices 5. lack of horizontal production rules 6. lack of separator lists 7. lack of trivially defined nonterminals (with α, ε or φ) 8. no mixing of chain and non-chain production rules 9. the nonterminal call graph is connected, and its top nonterminals are the starting symbols of the grammar It can be shown that transforming any grammar into its Abstract Normal Form is in fact a grammar mutation (see §3.8.1). In the prototype, I have implemented it to effectively generate bidirectional grammar transformation steps, so the normalisation preserves any information that it needs to abstract from. Grammar design mutation Some grammar design smells (terminology per [Sto12a]) like yaccification (per [SV99; BSV98]) or layered expressions (per [LZ09a]) have shown to be persistent enough to survive all normalisations and cause problems for establishing nominal and structural mappings. They can be identified and dealt with by automated analyses and mutations, but so far I have to proof that they are the only possible obstacles, and no guarantees about any other smells problematic for guided grammar convergence. 3.1.1 Generalisation of production signatures The method of establishing nonterminal mappings of different grammars of the same intended language, can be generalised as follows. Suppose that we have a metalanguage. Without loss of generality, let us assume that each grammar definition construct that is present in it, can be referred to by a single symbol: “,”, “?”, “*”, etc and uses prefix notation. This metasyntactic alphabet Λ will form the foundation of our footprints and signatures. Let us also assume that all metasymbols are unary or are encoded as unary, except for two composition constructs: a sequential “,” and an alternative “|”, which take a list of symbols. Then, a footprint of any nonterminal n in an expression x is a multiset of metasymbols that are used for occurrences of n within x: πn(x) =  {1} if x = n {μ} if x = μ(n), μ ∈ Λ ⋃ e∈L πn(e) if x = ,(L) ∅ otherwise, also if x = |(L) Our previously given definition of a production signature can still be used with this generally redefined footprints. It is well known that language equivalence is undecidable. Any formulation of the grammar equivalence problem, that is based on language equivalence, is thus also undecidable. Grammar convergence [LZ09a; LZ11] is a practically reformulated grammar equivalence problem that uses automated grammar transformation steps programmed by a human expert. By using these generalised metasyntactic signatures, we can infer converging transformation steps automatically, thus eliminating the weakest link of the present methodology. However, this is not the only application of the generalisation. The most trivial use of metasyntactic footprints and signatures would lie in grammarware metrics. Research on software metrics applied to context-free grammars has never been an extremely popular topic, but it did receive some attention in the 1970s [Gru71], 1980s [Kel81] and even recently [PM04; Čre+10]. Using quantitative aspects of metasyntactic footprints and signatures (numbers of different footprints within

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Core Units of Spoken Grammar in Global ELT Textbooks

Materials evaluation studies have constantly demonstrated that there is no one fixed procedure for conducting textbook evaluation studies. Instead, the criteria must be selected according to the needs and objectives of the context in which evaluation takes place. The speaking skill as part of the communicative competence has been emphasized as an important objective in language teaching. The pr...

متن کامل

The Effect of Grammar vs. Vocabulary Pre-teaching on EFL Learners’ Reading Comprehension: A Schema-Theoretic View of Reading

This study was designed to investigate the effect of grammar and vocabulary pre-teaching, as two types of pre-reading activities, on the Iranian EFL learners’ reading comprehension from a schema–theoretic perspective. The sample consisted of 90 female students studying at pre-university centers of Isfahan.  The subjects were randomly divided into three equal-in-number groups. They participated ...

متن کامل

The effects of Curriculum-Based Measurement on EFL learners' achievements in grammar and reading

The purpose of this study was to examine the effect of using Curriculum-Based Measurement (CBM) on the learners’ achievement in L2 grammar and reading in an EFL context and to further  investigate  whether  the  students’  classroom  performances  would  predict  their  final exam  results.  To  conduct  this  study,  two  classes,  each  containing  30  female  students,  were selected  among ...

متن کامل

یک مدل بیزی برای استخراج باناظر گرامر زبان طبیعی

In this paper, we show that the problem of grammar induction could be modeled as a combination of several model selection problems. We use the infinite generalization of a Bayesian model of cognition to solve each model selection problem in our grammar induction model. This Bayesian model is capable of solving model selection problems, consistent with human cognition. We also show that using th...

متن کامل

Iranian EFL High School Students’ Perceptions Regarding Written Grammar Feedback

This paper reports on a study thatinvestigated Iranian EFL high school students’ perceptions of written grammar feedback to specify their reasons for preferring comprehensive or selective feedback and choosing some feedback strategies. A questionnaire was administered to 100 EFL intermediate high school students who were selected based on their scores on a proficiency test. Moreover, semi-struc...

متن کامل

Experimental and Numerical Simulation of Water Hammer in Water Conveyance Pipeline and Effect of Surge Tower Pipe in Controlling this Phenomenon

Water hammer is one of the unsteady flows in urban water distribution networks, which has been of great importance due to the damage caused to the pipeline and has always been of interest to researchers. In this study, the phenomenon of water hammer due to the sudden closure of the valve in the downstream end has been investigated in a laboratory and using a numerical model. In the laboratory s...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1212.4446  شماره 

صفحات  -

تاریخ انتشار 2012